#!/bin/bash

RMs="164 165"
WRM1s="166 168 172" 
WRM2s="167 171"

for manager in $RMs
do
  sed -e"s/xxx/$manager/g" server.conf > ./$manager/server.conf
  cp rmConfiguration.properties ./$manager/rmConfiguration.properties
done

for client1 in $WRM1s
do
  sed -e"s/xxx/$client1/g" client.conf > ./$client1/client.conf
  sed -e"s/xxx/164/g" wrmConfiguration.properties > ./$client1/wrmConfiguration.properties
done


for client2 in $WRM2s
do
  sed -e"s/xxx/$client2/g" client.conf > ./$client2/client.conf
  sed -e"s/xxx/165/g" wrmConfiguration.properties > ./$client2/wrmConfiguration.properties
done
